package com.mmall.service;

import com.github.pagehelper.PageInfo;
import com.mmall.common.ServerResponse;
import com.mmall.pojo.Product;
import com.mmall.vo.ProductDetailVO;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author cg.hu
 * @version 1.0.0
 * @date 2021-09-18 11:21
 * @description 商品相关接口
 * @since 1.0.0
 */
public interface IProductService {

    ServerResponse saveOrUpdateProduct(Product product);

    ServerResponse setSalesStatus(Integer productId, Integer status);

    ServerResponse<ProductDetailVO> manageProductDetail(Integer productId);

    ServerResponse<ProductDetailVO> getProductDetail(Integer productId);

    ServerResponse getProductList(int pageNum, int pageSize);

    ServerResponse search(String productName, Integer productId, int pageNum, int pageSize);

    ServerResponse<PageInfo> getProductByKeyWordCategory(String keyWord,
                                                         String orderBy,
                                                         Integer categoryId,
                                                         int pageNum,
                                                         int pageSize);
}
